{% extends "base_min.html" %}

{% block head %}
  <link rel="stylesheet" type="text/css" href='/css/main.css?zx={{version}}'/>
  <link rel="stylesheet" type="text/css" href="/css/jquery.autocomplete.css?zx={{version}}" />
  {% block css_files %}{% endblock %}

  <script type='text/javascript'>
    var vol = {};  // Namespace
  </script>
  <script src='http://www.google.com/jsapi?key={{ maps_api_key }}' type='text/javascript'></script>

{% if "appspot.com"|isin:host and not js_debug %} 
  <script type='text/javascript' src='http://www.gmodules.com/ig/proxy?url=http%3A%2F%2Fsuprfetch.appspot.com%2F%3Furl%3D{{host}}%2Fjs%2Fthird_party%2Fjquery-1.3.2.min.js%3Fzx%3D{{version}}%26url%3D{{host}}%2Fjs%2Fthird_party%2Fjquery.json-1.3.min.js%3Fzx%3D{{version}}%26url%3D{{host}}%2Fjs%2Fthird_party%2Frsh.js%3Fzx%3D{{version}}%26url%3D{{host}}%2Fjs%2Fthird_party%2Fjquery.autocomplete.js%3Fzx%3D{{version}}%26url%3D{{host}}%2Fjs%2Fthird_party%2Fjquery.simplemodal.js%3Fzx%3D{{version}}%26url%3D{{host}}%2Fjs%2Futils.js%3Fzx%3D{{version}}%26jsmin%3Dtrue'></script>
{% else %}
  <script type='text/javascript' src='/js/third_party/jquery-1.3.2.min.js?zx={{version}}'></script>
  <script type='text/javascript' src='/js/third_party/jquery.json-1.3.min.js?zx={{version}}'></script>
  <script type='text/javascript' src='/js/third_party/rsh.js?zx={{version}}'></script>
  <script type='text/javascript' src='/js/third_party/jquery.autocomplete.js?zx={{version}}'></script>
  <script type='text/javascript' src='/js/third_party/jquery.simplemodal.js?zx={{version}}'></script>
  <script type='text/javascript' src='/js/utils.js?zx={{version}}'></script>
{% endif %}

  <script type='text/javascript'>
    // These components load asynchronously.  We use AsyncLoadManager to
    // queue up function callbacks until each component is loaded.
    var asyncLoadManager = new AsyncLoadManager(
        [ 'map', 'addthis', 'bodyload', 'friendconnect' ]
    );

    // ...and one to queue JS callbacks on body unload event.
    var onUnloadWorkQueue = new WorkQueue();

    var currentPageName = '{{ current_page|escape }}';

    var popularSearches = [ 'Park', 'Education', 'Hunger',
      'Homeless', 'Seniors', 'Health', 'Animals', 'Hospital' ];
  </script>
{% block js_files %}{% endblock %}
  <link rel='shortcut icon' href='/images/favicon.ico' />
{% endblock %}

{% block body %}
<body onload='asyncLoadManager.doneLoading("bodyload");'>  
 <img id='background_top_gradient' src='/images/background-gradient.png'>
 <div id='login_bar_position'>
   <div id='login_bar'>
     {% include "login_bar.html" %}
   </div>
 </div>

 <center>
 <div id='body_centered'>
  {% include 'header.html' %}
  {% block subheader %}{% endblock %}

  <div>
  <table cellpadding='0' cellspacing='0'>
  <tr>
    <td class='glow_tl'><img class='glow_tl' src='../images/glow-tl.gif'></td>
    <td class='glow_top'></td>
    <td class='glow_tr'><img class='glow_tr' src='../images/glow-tr.gif'></td>
  </tr>
  <tr>
    <td class='glow_left'></td>
    <td style='background:white'><div id='content_outer1'><div id='content_outer2'>{% block content_layout %}{% endblock %}</div></div></td>
    <td class='glow_right'></td>
  </tr>
  <tr>
    <td class='glow_bl'><img class='glow_bl' src='../images/glow-bl.gif'></td>
    <td class='glow_bottom'></td>
    <td class='glow_br'><img class='glow_br' src='../images/glow-br.gif'></td>
  </tr>
  </table>
  </div>

  {% block prefooter %}{% endblock %}

  {% block footer %}
  <div id='footer'>
    <div id='footer_right'>
      <a href='/about'>About Us</a> -
      <a href='http://www.blog-allforgood.org/'>Blog</a> -
      <a href='/help'>Help</a> -
      <a href='/privacypolicy'>Privacy Policy</a> -
      <a href='/tos'>Terms of Service</a>

      <!-- | <a href='/publishers'>Publishers</a> -->
    </div>
    <div>
      &copy; 2009 All for Good
    </div>
  </div>
 {% endblock %}

 </div>
 </center>

  <div id='debug_snippets' style='display:none;'></div>
  <script>
    // Handle searches when in static content pages.
    if (!('submitForm' in window)) {
      window.submitForm = function(fromWhere) {
        var vol_loc = '';
        if (el('location')) {
          var location = getInputFieldValue(el('location'));
          vol_loc = '&vol_loc=' + escape(location);
          setSessionCookie('user_vol_loc', location);
        }
        window.location = '/search#q=' +
            escape(getInputFieldValue(el('keywords'))) +
            vol_loc;
      }
    }
  </script>

  <div id='pleaselogin' style='display:none'>
    <a href='#' title='Close' class='modal_close_x simplemodal-close'>x</a>
    <div class='header'><span>Please sign in</span></div>
    <p class='message'>You need to sign in before liking an opportunity.</p>
    <div class='buttons'>
      <div class='ok'>Ok</div>
    </div>
  </div>

</body>
{% endblock %}

